from django.db import models

# Create your models here.
from rest_framework.views import APIView
from rest_framework.response import Response

class User(models.Model):
    gender_choices=(
        (0,'male'),
        (1,'female'),
        (2,'other'),
    )
    name=models.CharField(max_length=100)
    password=models.CharField(max_length=100)
    gender=models.SmallIntegerField(choices=gender_choices,default=0)

    class Meter:
        db_table="bz_user"
        v_name="用户"

    def __abs__(self):
        return self.name



